Tails Adventures Level Editor Suite Documentation

by Supper (suppertails66@gmail.com)

Table of Contents

  1. Overview
  2. Getting Started
  3. Basic Program Use
    1. Menu Bar
    2. Tool Selection Sidebar
    3. Current Editing Tool
  4. How a Level Works
  5. Editing Tools
    1. Level Editor
      1. Level Editor Components
      2. Object Properties Dialog
      3. Spawn Properties Dialog
      4. Level Properties Dialog
      5. Warp Editor Dialog
    2. VRAM Editor
      1. VRAM Primer
      2. VRAM Editor Components
      3. Object Headers Dialog
      4. Add Graphic Dialog
    3. Graphics and Collision Editor
      1. Graphics Primer
      2. Graphics Editor Components
      3. Native Graphics Export Dialog
      4. Native Graphics Import Dialog
      5. Import/Export Warnings
    4. Tilemap Editor
      1. Tilemap Primer
      2. Tilemap Editor Components
    5. Palette Editor
      1. Palette Editor Components
    6. Palette Cycle Editor
      1. Palette Cycle Editor Components
    7. Metatile Structure Editor
      1. Metatile Structure Primer
      2. Metatile Structure Editor Components
    8. Metatile Behavior Editor
      1. Metatile Behavior Primer
      2. Metatile Behavior Editor Components
      3. Metatile Behavior List
    9. Width/Height Map Editor
      1. Width/Height Map Primer
      2. Width/Height Map Editor Components
      3. Width/Height Edit Dialog
    10. Music Editor
      1. Music Editor Components
    11. Power-Up Editor
      1. Power-Up Editor Components
    12. Hacks and Enhancements Editor
      1. Hacks and Enhancements Editor Components
    13. Export Resources Dialog
  6. Game Quirks
    1. VRAM Caveats
    2. Metatile Structure Caveats
    3. Music Quirks
    4. Sea Fox
    5. Water
    6. Psuedo-Levels
    7. Substitute Levels
    8. Polly Mt. 2 Palette
    9. Battle Fortress 1
    10. Graphic Cycling Effects
    11. Sea Fox Item Pickup Bug
    12. Camera Starting Positions
    13. Nonstandard Level Effects
    14. Bosses
    15. How to Complete the Game
  7. Tips and Tricks
    1. One-Way Levels
    2. Teleporters
    3. Object 69
    4. Manual Map Numbers

Overview

Tails Adventures—a.k.a. Tails Adventure or Tails' Adventure—is, as you most likely already know if you're reading this, a 1995 game for Sega's Game Gear system. It was developed by Aspect, the company responsible for most of the Sonic platformers for the Master System and Game Gear, and runs on a variation of the engine used for games like Sonic Chaos and Sonic Triple Trouble. Despite this lineage, it's a radical departure from its predecessors in terms of gameplay; instead of standard Sonic go-fast platforming, it follows Tails on a slower-paced quest for the items he needs to defeat the army of ducks that have invaded his island for some reason.

Tails Adventures Level Editor Suite (Tales) is an editing program for Tails Adventures. It can modify almost every aspect of the game, such as level layout, graphics, and power-ups. This manual documents the program's features. While most of the editing tools should (hopefully) be fairly self-explanatory, the game has a number of limitations that aren't immediately apparent. These will be explained as they become relevant.

Getting Started

If you haven't used Tales before, I suggest you first try booting the program up and playing around it. I've tried to make it reasonably intuitive to use; you shouldn't need this manual to load the game up and do some basic editing. If you get stuck or can't figure out how something works, then consult the documentation as appropriate. However, you should probably at least read the Level Editor section at some point—particularly the explanation of the editing tools, as some of them have extremely convenient features that aren't immediately obvious. It's also a good idea to take a look at the Game Quirks and Tips and Tricks sections.

Basic Program Use

The first time you run tales.exe, you should be greeted by a dialog box similar to the above. In order to function, the program needs an unmodified ROM image of Tails Adventures from which to read data to create new projects. You must supply this file yourself. The path of the chosen file is saved to the program configuration file, tales.cfg, so you only need to do this once.

WARNING: Don't modify the selected ROM! This file is used as a data source whenever a new project is created. If the file is not a clean Tails Adventures ROM, the program will most likely misbehave or crash.


After choosing your ROM, the editor proper will launch. There are three basic components of the program that are displayed at all times:

  1. The menu bar. The menu bar provides access to essential program functions like saving, loading, and changing tools. It contains several submenus, each with their own set of options.
  2. The tool selection sidebar. This bar provides quick access to each of the editing tools, represented by a small icon.
  3. The current editing tool. This allows some aspect of the game to be edited.

The menu bar contains several submenus for manipulating the program.

  1. File: This is the most fundamentally important component of the program. The File menu allows projects to be saved and loaded to a project file, or exported to a playable ROM image. A project file (extension: .tls) contains the data Tales needs to make edits—it is not a playable game. Project files are used to store data between program sessions. To produce a playable game, the project data must be exported to a ROM image (extension: .gg). The File menu contains the following items:
    1. Open project... (Ctrl+O): Opens an existing project file.
    2. Save project (Ctrl+S): Saves the current project to the file it was last saved or loaded from. If the project has not yet been saved or loaded, this functions identically to the Save As option.
    3. Save as... (Ctrl+Shift+S): Opens a dialog box for selecting a location to save the current project.
    4. Export ROM (Ctrl+E): Exports the project as a playable ROM image to the location it was most recently exported to. If the project has not yet been exported, this functions identically to the Export ROM As option.
    5. Export ROM as... (Ctrl+Shift+E): Opens a dialog box for selecting a location to export the current project as a playable ROM.
    6. Export resources...: Opens the Export Resources dialog.
  2. Tools: contains a list of editing tools that can be selected for use. The currently selected tool is indicated by a check mark next to its name. Identical in function to the tool selection sidebar—see that section for details.
  3. Help: contains the About option, which displays program authorship and version information.

Tool Selection Sidebar

The tool selection sidebar is a series of graphical icons that provide quick access to the program's editing tools.

Current Editing Tool

Most of the program window is comprised of the current editing tool. Each tool has its own interface. These are described in detail in the following section.

How a Level Works

Conceptually, each level of Tails Adventures has three parts: the metatile layout, the object layout, and the spawn layout. The metatile layout determines how the "static", unchanging parts of the level look and behave. The object layouts determines where objects appear in the level. The spawn layout determines the starting positions of Tails and the camera within the level.

The basic building block of a level is the metatile. A metatile is a 16x16 pixel block built out of four 8x8 tiles. The game defines 256 metatiles that can be placed in any level. Each of the 256 metatiles behaves the same no matter which level it is placed in—only the appearance may change, depending on the level's VRAM and metatile structure definitions. Each metatile has several properties that determine its exact function—see Metatile Behavior Primer for more details.

Each level also contains up to 64 objects. Each object defined in a level has several properties:

It is important to note that due to space restrictions, there is an absolute upper limit of 1645 objects total across all levels.

The game needs to know where to place Tails in a level when it starts, so every standard level has one or more Tails spawn points. These spawn points consist of two X/Y positions: one for Tails, and one for the game's camera. The number of spawn points for a level is fixed; most have at least two. Spawn points are numbered sequentially. When an area is accessed from the world map, Tails appears at the first spawn point in the first map of the target area.

To create connections from one level to another, each level has a fixed number of warp definitions. Each level in the game is identified by two numbers: an area and a map. A warp definition specifies the area and map number of the target level, as well as a spawn index number indicating which of that level's spawn points Tails should start at when the warp is accessed. Each warp also contains 12 unlock flags, each corresponding to a location on the world map. When the warp is used, any area whose unlock flag is set will be unlocked for access on the world map. Warps are triggered using warp objects, described later.

Levels also contain a number of miscellaneous properties:

Editing Tools

Level Editor

The level editor is the meat of the program, and the most complex component by far. It allows virtually all aspects of level layout to be customized, as well as spects of the game flow like connections between levels.

Level Editor Components

The level editor consists of a few different parts, as labelled on the image above:

  1. The level preview area. This is an interactive display of the currently selected level. Its appearance varies based on the chosen display mode and active overlays, but generally it shows the layout of the current level, its objects and spawn points, and the boundaries of the camera. The scroll bars at the bottom and right of the preview allow it to be scrolled to view different parts of the level. The editing tools described below are used by interacting with this part of the screen.

    Shortcuts:

    • Mouse wheel up/down: scroll display vertically
    • Shift+Mouse wheel up/down: scroll display horizontally
    • Ctrl+either of the above: scroll display faster

  2. The level editing tool menu. The buttons in this menu switch the active tool for the level preview area.
  3. There are also two non-tool buttons in this area:

  4. The metatile picker. This displays the metatiles for the current level. Left-clicking on a metatile selects it as the current tile for the Pencil tool (switching to the Pencil tool if it is not already in use).
  5. The object list. This lists the names and initial states of all of the objects in the current level. Left-click on an object's entry in the list to select it and scroll the preview area to its current location. Double-click on the entry to open its Object Properties Dialog. The Add... button opens the Add Object Dialog. The Remove button removes the currently selected object. The Autofill all button attempts to automatically correct the VRAM indices of all objects in the level, which is useful after rearranging a level's VRAM in the VRAM Editor. Finally, the text label below the list shows how many object slots out of the maximum are currently in use. If the maximum limit is reached, no more objects may be placed.
  6. The display settings. The settings in this area control what information is displayed in the preview area and metatile picker.
    • Grid: turns the metatile grid overlay on and off.
    • Zoom: zooms the preview display in and out. Zoom levels range from 25% to 400%.
    • Metatile display options: changes how metatiles are displayed.
      • Visual: metatiles are displayed as they will appear in-game.
      • Behavior: metatiles are displayed as icons representing their function in the level.
      • Vert. solidity: each metatile's height map is displayed. Fully solid tiles appear black; tiles that are solid on top appear gray. If a tile has a nonzero height map but is marked as nonsolid, it will appear in very light gray.
      • Horiz. solidity: same as the Vert. solidity option, but for width maps.
    • Layer display options: changes which "layers" of the preview are drawn.
      • BG: toggles whether tiles with background priority are displayed.
      • FG: toggles whether tiles with foreground priority are displayed.
      • Objects: toggles whether objects are displayed.
      • Spawns: toggles whether Tails spawn points are displayed.
  7. The camera boundaries editor. The four numbers listed indicate where scrolling will be halted in each direction. Note that coordinates are given as distances from the left side of the screen (for left/right bounds), or the top side of the screen (for top/bottom bounds). There is also a "dead area" at the top and left of each area that the game is not capable of displaying (this is a technical issue related to the size of the Game Gear's screen). The Show box toggles whether or not the camera boundaries are displayed in the preview.
  8. The map selector. The game's maps are listed here, sorted by area. Left-click on a map's entry to open it for editing.

    Note: Some maps have hardcoded "alternate" layouts that are loaded in place of the "regular" layout under certain circumstances. These maps share their object layout with the "parent" map, but are otherwise unique (i.e. they have their own properties and metatile layout). Such levels are marked as "Special" in this list, with their "parent" map listed in parentheses.

Object Properties Dialog

The Object Properties Dialog is accessed by double-clicking on either an object's preview in the preview area, or its entry in the object list. It allows the object's properties to be modified.

Spawn Properties Dialog

The Spawn Properties Dialog is accessed by double-clicking on a spawn point (Tails graphic) in the preview display. Like the Object Properties Dialog, it allows the spawn's position to be manually modified. It also allows the camera's starting position to be changed. For convenience, the camera position is expressed as an offset from Tails' position.

Warp Editor Dialog

The Warp Editor Dialog is accessed by clicking the Warps... button. The Warp combo box allows each of the defined warps for the current level to be selected for editing. The Area, Map, and Spawn boxes set the warp's destination. The Area Unlock Flags determine which areas on the world map are unlocked when the warp is used.

If the manual map/spawn box is checked, then the two boxes on the right can be used to directly set the map and spawn numbers to a value from 0 to 255. Don't turn this on unless you know what you're doing – see the Manual Map Numbers section for details.

There are a couple of special cases hardcoded into the game. First, if a warp's area is set to "World map", then the "Spawn" parameter determines which area the Tails icon is set to when the warp is used. Second, warps to the world map can have a spawn parameter of "Coco Island escape". In this case, the Coco Island escape cutscene sequence will trigger when the warp is taken.

Level Properties Dialog

The Level Properties Dialog is accessed by clicking the Level Properties... button. It sets a number of miscellaneous level properties:

There are also a few options for performing semi-common modifications to levels:

VRAM Editor

The VRAM editor is probably the second most important part of the program after the level editor. It can rearrange and alter the contents of VRAM, allowing objects to be placed in levels they weren't originally meant to be in. It also handles some miscellaneous editing tasks related to the locations of certain graphics in VRAM, such the as leaf graphic used for wind gust effects.

VRAM Primer

On the Master System and Game Gear, VRAM consists of up to 512 pattern (tile) definitions, which constitute the graphics the system can display. Of those, 64 patterns' worth of space must be used to store graphics metadata; Tails Adventures always uses the last 64 patterns for this purpose. This leaves 448 free patterns at the start of VRAM.

Tails Adventures devotes the first 256 patterns to object graphics, and the remaining 192 to level graphics. All of the graphics for a level are stored as one big graphic. To save space, however, object graphics are broken up into small pieces, and each level loads whatever it needs to display its objects. This offers us some freedom to shuffle object VRAM around so we can put different objects in levels, which is the main purpose of the VRAM editor.

An important limitation of the SMS/GG video hardware is that it cannot flip sprites. Since objects are rendered using sprites, objects that can face left or right—as most objects in the game can—must have horizontally flipped versions of their graphics loaded to VRAM. Tails Adventures therefore has some special handling for flipped versions of graphics, as we will see.

Tails Adventures does not actually define a unique object VRAM layout for each level; instead, it has a number of object graphic "packs" or "groups" that it recycles where it can. Fortunately, this limitation is not terribly relevant because Tales can insert new packs alongside the originals.

VRAM Editor Components

  1. VRAM Preview: The main component of the VRAM editor, this interactive display previews the contents of VRAM in the currently selected level. Each of the graphics to be loaded is displayed in its target position. Left-clicking on an object graphic highlights it in both the preview and the object graphic list. To move a graphic to a new location in VRAM, click and drag it to a different place. Additionally, the selected graphics for the leaf, smoke puff, and water splash graphics will be shown here if their corresponding displays are enabled (see below).
  2. Selected Graphic Info: displays information about the currently highlighted graphic in the VRAM preview. The Index box shows the raw VRAM index of the graphic and allows it to be manually changed to a new value. The Select button provides an alternate method of moving the graphic: click the button, then click the location in the VRAM preview where the graphic should go. The Flipped check box indicates whether the selected graphic is horizontally flipped or not.
  3. Object Graphic List: lists the current level's object graphic pack and all of its contained graphics, by name. Left-clicking an object graphic's name highlights it in both the list and the VRAM preview. The Up Arrow and Down Arrow buttons move the currently selected graphic up or down the list, changing its priority (graphics lower on the list will be overwritten by those higher on the list). The graphic pack box allows the graphic pack used for the level to be changed. The Edit... button opens the Object Headers Dialog, where new graphic packs can be created and removed. Finally, the Add... button brings up the Add Graphic Dialog, while the Remove button removes the currently selected graphic from the pack.
  4. Other Settings: allows non-object aspects of VRAM to be modified.
    • Map graphic box: allows the map graphic for the current level to be changed. There is only one map graphic allowed per level, so generally this needs to be one of the game's provided level graphics.
    • Leaf index box: Tails Adventures defines a "leaf index" for each area of the game. When the game wants to generate a wind gust effect, it looks up the leaf index for the current area and uses the patterns at that location to draw the effect. This allows space for other graphics to be optimally assigned, and is also used to composite two different graphics for the "fire wind" effect in Polly Mt. 2. This box allows the leaf index to be changed. To make this easier, the Select button, when clicked, allows the new location to be chosen by clicking on the VRAM preview.

      Note: The leaf index is shared among all maps in an area. It can't be separately set for each map. Also note that the leaf index for Polly Mt. 1's boss arena (area 4-3) is hardcoded to index 250 and cannot be changed.

    • Smoke puff index box: Nearly identical in function to the leaf index box, this one specifies the location of the graphics for the smoke puff emitted from the Sea Fox when it fires a weapon. However, this index is not shared among maps in an area; each map has its own index.
    • Water splash index box: Same as the smoke puff index, including unique definitions per map, for the splash effect that appears when Tails or the Sea Fox jumps in/out of the water.
  5. Map selector: allows the current level to be changed. Click any map entry to select it.

Object Headers Dialog

The Object Headers Dialog allows new object graphic packs to be added and removed from the game. The Add button adds a new, empty pack to the end of the list, while the Remove button removes the currently highlighted pack. After confirming the changes with OK, any newly added packs can be populated by assigning the pack to a new level and changing it as needed.

Add Graphic Dialog

The Add Graphic Dialog allows a new graphic to be added to an object graphic pack. The graphic list on the right lists all the graphics that can be added to VRAM by name, sorted by category and then alphabetically. The graphic preview on the left shows the selected graphic and the number of tiles in VRAM it will occupy. The flip options at the bottom select whether to add the graphic as-is, flipped, or both (as two graphics, one for each direction).

Graphics and Collision Editor

The graphics editor provides rudimentary but functional editing of all the graphics in Tails Adventures, both compressed and uncompressed, as well as the ability to diplay and modify object collision boxes.

Graphics Primer

On the Master System and Game Gear, raw graphics consist of a series of patterns of pixel data. Each pattern can be combined with one of two 16-color palettes to form a color image. Patterns can be stored in the ROM either compressed or uncompressed; graphics stored uncompressed can be loaded quickly, which makes them suitable for player character graphics (which are too numerous to all fit in VRAM at once, and so are loaded one at a time as needed).

Tails Adventures combines raw graphic patterns together to produce the "object graphics" that are displayed to the player using sprites. A sprite is an 8x8 graphic that is not aligned to a grid the way a tile in a tilemap is. Sprites have a transparent color, which is always the first (zeroth) color in the palette. The way multiple sprites are assembled to form a single image is referred to as a sprite mapping. The game also assigns every sprite mapping a collision box, so that an object that uses a mapping can tell when it has touched another object.

An important point to note is that Tails Adventures uses the SMS/GG "tall" sprite mode at all times. This means that every time a sprite is displayed on-screen, whatever pattern in VRAM comes immediately after the one used by the sprite will be displayed one tile underneath it (thus simulating a single 8x16 sprite).

Tales does not support editing of sprite mappings for technical reasons (i.e. it's more trouble than it's worth). However, it can edit graphics and collision boxes.

Graphics Editor Components

  1. Graphic preview: Displays the raw patterns that compose the selected graphic. This area can be interacted with to edit the graphics using the tools described below. The graphic combo box at the top allows the selected graphic to be changed. The Import... and Export... buttons allow the current graphic to be exported and imported using the rules described in the sections Native Graphics Export Dialog and Native Graphics Import Dialog, with the Transparency check box determining whether the exported image marks color 0 as transparent.
  2. Sprite mapping preview: Displays the currently selected sprite mapping, if any, for the active graphic. Not all graphics have mappings. For those that do, this area can be interacted with to edit the graphic, just like the graphic preview area. The mapping combo box at the top allows the selected mapping to be changed, and the Import... and Export... buttons function analagously to those in the graphic preview area.
  3. Graphic editing tools: The basic tools for editing.
    • Preview palette: shows the palette being used to edit the graphic. Graphics can be colored using more than one palette, so the colors displayed are just for editing purposes. Clicking on a color selects it as the current color for the Pencil tool.
    • Preview palette box: allows the preview palette for the current graphic to be changed. If changed, the new value will be saved as the default used whenever the graphic is loaded for editing.
    • Toolbar:
      • Pencil: a simple tool for drawing one pixel at a time.
        • Left-click: draw the selected color to the clicked pixel. Either the graphic preview or the sprite mapping preview can be clicked.
        • Right-click: set the clicked pixel to color 0 (sprite transparency). Essentially an "eraser".
        • Ctrl+left-click: "pick up" the clicked pixel as the current color. Equivalent to the "dropper" tool in many image editing programs.
      • Export all...: opens the Native Graphics Export Dialog.
      • Import all...: opens the Native Graphics Import Dialog.
    • Zoom box: changes the current zoom level. Ranges from 100% to 1600%.
    • Transparency check box: sets whether sprite transparency is enabled or disabled. If enabled, transparency pixels are displayed as white.
    • Grid check box: sets whether an 8x8 tile grid is overlaid onto the editing preview(s).
  4. Collision editor: allows the current sprite mapping's collision box to be edited. The Width and Height boxes allow the box's width and height to be changed. The X-offset and Y-offset boxes change the offset of the graphic itself from its associated object's centerpoint; thus, changing their values may not yield the results you'd intuitively expect. The Collision check box sets whether or not the collision box is overlayed onto the sprite mapping.

Native Graphics Export Dialog

The Native Graphics Export Dialog is a tool for exporting the game's graphics en masse as .PNG files suitable for editing in an external program. The edited files can then be imported back in individually using the import/export tools in the graphics editor proper, or all at once by using the Native Graphics Import Dialog.

The check boxes at the top of the dialog select what to export: raw tile data and/or sprite mappings. The Transparency in output check box determines whether or not color 0 will be marked as transparent in the output images. Do not enable transparency if you plan to edit the files with GIMP—see Import/Export Warnings below. Clicking the Export... button brings up a dialog for selecting the folder where the exported files will be placed; confirming that dialog exports the chosen files.

Native Graphics Import Dialog

The Native Graphics Import Dialog is a tool for importing specifically formatted .PNG files en masse to replace existing graphics. Generally, these will be edited versions of files exported using the Native Graphics Export Dialog.

The radio buttons at the top of the dialog select what to import: raw tile data or sprite mappings. Clicking the Import... button brings up a dialog for selecting the folder to read the data from; confirming that dialog imports the chosen files.

This procedure will overwrite all existing graphics data, so be careful not to accidentally erase changes you have made in Tales. Files imported using this method must be named in a specific format—specifically, that produced by the Native Graphics Export Dialog. Files that are missing will obviously be ignored.

Import/Export Warnings

For importing and exporting graphics to work properly, make sure you keep the following in mind:

Tilemap Editor

The tilemap editor can modify the layout of the game's fixed-position tilemaps, such as the title screen and world map.

Tilemap Primer

In Tails Adventures, a tilemap is a rectangular area composed of 8x8 tiles. For details about how tiles work, see the Metatile Structure Primer. Suffice it to say that a tilemap specifies the type and layout of patterns from a particular graphic. Due to the nature of the game, the graphic associated with a tilemap is more or less hardcoded, and Tales does not allow it to be changed.

There are two tilemap formats in Tails Adventures: 2-byte-per-tile (2bpt) and 1-byte-per-tile (1bpt). 2bpt tilemaps store full tile information for every pattern in the tilemap. 1bpt tilemaps store only the low byte of the data and use a hardcoded value for the upper, which in practical terms means that (a.) only half the patterns in VRAM can be used in the tilemap, usually hardcoded to the lower 256 patterns; and (b.) only the pattern number of the tile can be modified, not the priority or other settings. The vast majority of tilemaps are 2bpt, with notable exceptions including the title screen and the credits text.

Tilemap Components

  1. Tilemap selector: allows different tilemaps to be selected for editing.
  2. Tilemap preview: an interactive display that allows the tilemap to be modified. Tools and controls are explained below under Editing tools.
  3. Tile selector: an interactive display showing the tiles in the graphic associated with the tilemap. Generally, this indicates the "active" metatile for each tool, and allows different ones to be selected as "active".
  4. Editing tools: allows different tools to be selected for editing the tilemap.
    • Pencil (shortcut: P): "draws" on top of the tilemap.
      • Left-clicking on the tilemap preview overwrites the clicked tile with the active tile.
      • Left-clicking on the tile selector selects the clicked tile as the active tile.
      • Right-clicking on the tilemap preview flips the active tile horizontally when it is placed in the tilemap preview.
      • Middle-clicking on the tilemap preview flips the active tile vertically when it is placed in the tilemap preview.
      • Holding Shift and clicking on the tilemap preview selects the clicked tile as the active tile.
      • Holding Control and clicking on the tilemap preview switches to the Area Clone tool.
    • Area clone (shortcut: L): allows a rectangular portion of the tilemap to be coped to another area.
      • Left-clicking and dragging on the tilemap preview with nothing selected selects an area for copying.
      • Left-clicking after selecting something copies the selected area to the clicked area.
      • With an area selected, holding Control, left-clicking, and dragging selects a new area for copying.
      • Holding Shift and clicking on a tile switches to the Pencil tool and selects the clicked tile as the active tile.
      • Left-clicking on the tile selector switches to the Pencil tool and selects the clicked tile as the active tile.
    • Details editor (shortcut: K): allows details of each tile to be changed.
      • Left-clicking on the tilemap preview selects the clicked tile as the active tile.
      • Interacting with the detailed tile editor below the toolbar changes the properties of the active tile. Note that all functions of this editor exception the Tile box are disabled for 1bpt tilemaps.
      • Left-clicking on the tile selector changes the pattern associated with the active tile.
      • Right-clicking on the tilemap preview flips the clicked tile horizontally.
      • Middle-clicking on the tilemap preview flips the clicked tile vertically.
    • Grid check box: enables and disables the tilemap grid overlay.

Palette Editor

The palette editor can change the colors in the game's various color palettes.

Palette Editor Components

The palette editor is very simple. The palette combo box at the top selects the palette to be edited. The palette preview displays the chosen palette. Clicking on a color in the preview selects it as the active editing color. The active color can be edited using the color sliders representing the red, green, and blue components of the color.

Palette Cycle Editor

The palette cycle editor can change the colors in the game's various cycling palettes, which repeatedly change colors to create the illusion of motion.

Palette Cycle Editor Components

The palette cycle editor is virtually identical in format to the palette editor except for the new State combo box, which can be used to select each of the palette states in the cycle for editing. Any colors not used in the cycle are marked as disabled in the palette preview and cannot be edited.

Metatile Structure Editor

The metatile structure editor can modify the appearance of the game's metatiles by redefining which tiles are used to draw them.

Metatile Structure Primer

Each 16x16 metatile consists of four adjacent 8x8 tiles. A tile is a pattern in VRAM that is used as part of the SMS/GG's nametable—essentially, a "background" graphic. The SMS/GG hardware is capable of performing certain manipulation to tiles "on the fly":

Tails Adventures defines a number of metatile structure sets, each defining the tile layouts for a set of 256 metatiles. Each metatile structure consists of four tile definitions, each giving the appearance (pattern index, priority, etc.) of a tile in the metatile. Every level is associated with a metatile structure set used to draw its metatiles. Typically, levels with the same appearance share the same set.

Metatile Structure Editor Components

  1. Metatile picker: displays the metatile structures in the current set. Left-clicking a metatile in this area selects it for editing.
  2. Tile picker: displays the patterns in the current preview graphic, with the pattern used for the selected tile in the active metatile highlighted. Left-clicking a pattern in this area changes the selected tile to use the new pattern.
  3. Structure editor:
    • Metatile preview: shows an editable preview of the structure of the currently selected metatile. The four tile editors allow each of the structure's component tiles to be modified.
      • Left-clicking on a tile in the preview selects it as the active tile, allowing its VRAM index to be changed using the tile picker.
      • Right-clicking on a tile toggles its horizontal flip flag.
      • Middle-clicking on a tile toggles its vertical flip flag.
    • Tile structure box allows a different structure to be picked for the current metatile.
    • Add and Remove buttons: add a new structure layout and remove the current one, respectively. There must be between 1 and 256 (inclusive) structure definitions per set.
  4. Settings:
    • Grid check box: toggles the metatile and tile grids on and off.
    • Set box: allows the target set to be changed. Changing sets automatically loads the default preview graphic and palettes associated with that set.
    • Preview graphic box: changes the graphic used to display the current structure set. As a set can be associated with more than one set of graphics, determined by each level's VRAM configuration, this setting is for editing purposes only—it has no effect on the game if changed. If the preview graphic is changed, the new selection is saved as the default.
    • Preview palette boxes: change the palettes used to display the current structure set. The same caveats as above apply.

Metatile Behavior Editor

The metatile behavior editor allows several aspects of metatiles' behavior to be altered.

Metatile Behavior Primer

As previously discussed, the game defines 256 metatiles which have the same behavior throughout all the game's levels. Specifically, every metatile has a solidity setting, behavior property, width map, height map, and slope speed value.

Metatile Behavior Editor Components

  1. Metatile picker: displays the metatiles by behavior, vertical solidity, or horizontal solidity, according to the current settings. Left-clicking a metatile in this area selects it for editing.
  2. Display settings: changes how the metatiles in the metatile picker are previewed (by behavior, vertical solidity/height map, or horizontal solidity/width map). The Grid check box toggles the metatile grid on and off.
  3. Metatile editor: allows the current metatile's behavior to be changed. The radio buttons at the top set the solidity, while the combo boxes allow the slope speed, behavior, height map, and width map to be changed.

Metatile Behavior List

Behaviors listed in red have hardcoded behavior depending on what metatile index they are assigned to.

Width/Height Map Editor

The width/height map editor can modify the game's metatile width and height maps. It also allows slope speed values to be changed.

Width/Height Map Primer

To detect when objects are touching the level, the game assigns every metatile a width map and a height map. Width and height maps—occasionally referred to generically as "length maps"—each consist of 16 magnitude values, one for each pixel in a metatile's width or height. The magnitude indicates how far the metatile extends horizontally or vertically at the given index. The width map is used to detect collision on the x-axis, while the height map is used to detect collision on the y-axis.

Width maps can extend either from the right side of the metatile toward the left ("forward"), or the left side toward the right ("backward"). Similarly, height maps can extend either from the top of the metatile toward the bottom ("forward"), or the bottom toward the top ("backward"). Normally, all values in a length map face the same direction, although this is not required.

Width/Height Map Editor Components

  1. Length map preview: an interactive display of the current length map. Left-clicking a row or column in the display sets the corresponding row or column in the map. Double-clicking or right-clicking a row or column in the display opens the Length Map Edit Dialog, allowing its value to be manually set. The All forward button makes all lengths face forward, while the All backward button makes them all face backward.
  2. Width/height map selector: lists all the width and height maps in the game. Clicking on a width or height map opens it for editing in the preview.
  3. Slope speed editor: lists all of the game's slope speed values and allows them to be modified. See the explanation of slope speed values in the Metatile Behavior Primer.

Width/Height Map Edit Dialog

The Width/Height Map Edit Dialog is accessed by double-clicking or right-clicking a row or columns in the length map preview. It allows the magnitude of the length map at the selected point to be modified, and also allows the direction of its growth to be set to forward or backward.

An interesting point of fact is that the magnitude can be set as high as 63, well outside the actual boundaries of a metatile. However, the game will only recognize that an object has contacted the map when it is actually touching the associated metatile, causing it to "jump" away once it gets too close. This can be useful for achieving certain effects.

Music Editor

The music editor allows the music that plays in each area of the game to be changed. It can also alter the tracks that play when the Radio item is used.

Music Editor Components

The music editor is very simple. On the left is the area music editor. Each area of the game has an associated music track that plays on all maps in that area (with one exception). The combo boxes allow the track for each area to be changed. On the right is the Radio music editor, which functions identically except that it changes the tracks that play when the Radio item is used.

Note that there are entries for areas 13, 14, and 15 in the area music editor, despite the fact that no such areas exist. The values listed are placeholders taken directly from the game; changing them normally has no effect.

Power-Up Editor

The power-up editor adjusts how Tails' stats change when he picks up Chaos Emeralds.

Power-Up Editor Components

Each of the rows in the editor gives Tails' stats when he obtains the given number of emeralds. These stats are:

Enhancements Editor

The hacks and enhancements editor adds miscellaneous, optional enhancements and bugfixes to the game.

Enhancements Editor Components

There are a few different enhancements that can be applied:

Export Resources Dialog

The Export Resources dialog allows most graphics-related aspects of the game to be exported to external .PNG files en masse. Unlike the main editing tools, it is accessed through the File menu, under the option Export resources....

  1. Map exporter: exports level maps. The Visual, Behavior, Vert. solidity, and horiz. solidity check boxes control which views of the level are exported (with each view becoming a separate file). The Objects, Spawns, and Camera bounds check boxes enable and disable the corresponding graphical overlays, explained under Level Editor.
  2. Metatile exporter: exports metatile sets. Aggregate outputs sets as a single image like the metatile displays used in the program, while Individual outputs each metatile as a separate image. The preview graphic and palette from the metatile structure editor are used to export the graphics.
  3. Graphic exporter: exports graphics. Raw graphics exports the raw tiles that compose each graphic, and will render color 0 as transparent if the Transparency box is checked. Sprite mappings exports all the sprite mappings associated with each graphic. Aligned sprite mappings is the same as "Sprite mappings" except that each sprite mapping is centered on a 256x256 pixel transparent background according to its x-offset and y-offset parameter, as explained under Graphics Editor, allowing sprites to more easily be combined into animations. The preview palette from the graphics editor is used to export the graphics.
  4. Tilemap exporter: exports tilemaps.
  5. Progress bar: indicates progress through the current export. (Maps can take a while!)

Game Quirks

Some of Tails Adventures' internal workings are a bit arcane. This section tries to explain the less intuitive aspects of editing the game.

VRAM Caveats

Metatile Structure Caveats

Internally, Tails Adventures does not assign every metatile a unique structure definition. Instead, it defines the structures and assigns one to each metatile. Generally, "blank" metatiles all use a single structure, so editing one will change all of the others as well. You'll need to add a new metatile structure and assign it to each one to make use of those metatiles.

Due to a quirk involving how the game handles the world map, Tales creates a special metatile set, set 13, in which every metatile has a unique structure definition. If you need to create a new metatile structure set with more metatiles than an existing one provides, this set can be safely used for that purpose.

Music Quirks

Normally, all maps in an area share the same music. Exceptionally, Area 10-3, the Coco Island boss, is hardcoded to immediately play the boss music when entered, regardless of the area setting.

Sea Fox

The game hardcodes which levels use the Sea Fox and which don't:

Water

Tails Adventures actually has two very different concepts of water: Tails water and Sea Fox water.

Pseudo-Levels

In some cases, the game assigns map data to an area/map slot, but does not provide other data (such as an object layout). In these cases, the editor will allow only the editable aspects of the level to be changed. These "pseudo-levels" are:

Substitute Levels

The game has a few "substitute" level layouts that are hardcoded to load in place of others if certain conditions are met. This is used primarily to get rid of boss-related parts of levels after the boss has been defeated. The levels with substitutes are:

Polly Mt. 2 Palette

Polly Mt. 2's default palette is the "dark" palette shown before the Night Vision item has been used. To edit the level, switch it to the "bright" palette in the Level Properties dialog, then change it back when you're done. Note that the Night Vision item is hardcoded to change to that particular palette in that particular area.

Battle Fortress 1

Battle Fortress 1 (area 11-1, the flying Sea Fox level) is special: Tails cannot collide with the level in that area. This is to facilitate the battleship in the background, which uses more metatiles than the game normally assigns the "nonsolid" property to.

This level also has the rather peculiar property that in the unmodified game, it can be beaten maximally quickly and without taking damage simply by not pressing any buttons. Circumstantial evidence relating to the dummied-out effects set on 11-1 and 11-2 suggests they were originally intended to be autoscrolling levels, which probably would have made things more of a challenge.

Graphic Cycling Effects

Two of the game's effects, Lake Crystal animated water and Battle Fortress animated conveyor, are special: they continually load a cycle of uncompressed graphics to specific VRAM indices to simulate motion. The Lake Crystal effect always alters tiles 317-332, and the Battle Fortress effect always alters tile 373. If you want to use these effects in other levels, you'll need to make sure those graphics are the ones you want overwritten.

Sea Fox Item Pickup Bug

Due to a bug, picking up a Sea Fox item with an inventory slot empty will erroneously place that item in the regular inventory. Thus, you need to ensure that the player can't pick up any Sea Fox items until at least three regular items have been collected (filling up the four slots). Currently, this applies even when the use-all-items hack is on; this may change in future releases.

Camera Starting Positions

There are some quirks with how the camera starting position works. First, the camera can start outside of the level's camera boundaries. In this case, the camera will start at the listed position and will be allowed to scroll towards the valid boundary area, but not away from it. Second, if Tails starts too far away from the camera, he will be immediately kicked back to the world map when the level starts, so don't set the camera offset to anything too large.

Nonstandard Level Effects

A few of the game's level effects are somewhat unusual in function:

Bosses

Bosses tend to be very "hardcoded". Typically, they assume they will always be placed at the same x/y position, often locking the screen to that specific area. Here are a few tips to help with modifying boss levels:

How to Complete the Game

Tails Adventures triggers the ending sequence completely and fully only when

  1. the world map is loaded after defeating the final boss, and
  2. Battle Fortress 1 or 2 has been unlocked.
If the final boss is defeated but Battle Fortress is not unlocked—that is, Coco Island still appears on the world map—then the ending sequence will never finish because the Battle Fortress object can't be destroyed.

Tips and Tricks

This is a small collection of potentially interesting tricks you can do using Tales.

One-Way Levels

As described under Game Quirks, the camera's starting position is allowed to be outside of the camera boundaries for a level. By setting the camera starting position well outside of one or more of the camera boundaries, you can create a level that only scrolls in one direction up to a certain point.

Teleporters

By using the Width/Height Map Edit Dialog, you can set the magnitudes for a width or height map to values larger than the metatile itself. The net effect of this is that if, for example, you set all the magnitudes on a height map to 63, then stepping on a metatile with that height map will cause Tails to "teleport" up by approximately three metatiles—enough to push him through a low ceiling or other obstacle. Similar effects can be realized in other directions.

Object 69

Object 69, the "bird launcher" normally used to block the exit to Coco Island in area 6-5, is special. In its idle state, it is invisible and fires missiles at Tails when he is to the left of it. After being hit six times, it is destroyed, converting a 5x2 area of tiles to the right of it to metatile type 172. Metatile 172 is ordinarily a regular "passable" tile, so this can be used to open up a passageway. Metatile 172 can also be assigned a different effect in the metatile behavior editor to achieve different ends.

Perhaps more importantly, destroying this object sets the flag to load the alternate version of area 6-5, and prevents further instances of object 69 from spawning. That means there can only be one in the game, so consider carefully how best to use it.

Manual Map Numbers

The "Manual map/spawn" setting in the Warp Editor Dialog can be used to achieve several interesting effects.

Note that only maps or spawns further along the internal lists can be accessed. (For the technically inclined, these values are effectively unsigned – values of 128 or more can't be used to point to lower entries in the internal tables.)

Setting these to unusual values can be used to pull off some neat tricks, but be careful when doing this, because invalid values can cause crashes or other undesirable results.